import './assets/main.css'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'

// 导入mock服务（开发模式下使用）
import './mock'
console.log('Mock服务已导入')

// Naive UI
import {
  create,
  NMessageProvider,
  NDialogProvider,
  NConfigProvider,
  NLoadingBarProvider
} from 'naive-ui'

const app = createApp(App)

// 确保Pinia在其他插件之前初始化
app.use(createPinia())

// 创建naive-ui
const naive = create({
  components: [
    NMessageProvider,
    NDialogProvider,
    NConfigProvider,
    NLoadingBarProvider
  ]
})

app.use(router)
app.use(naive)

// 引入字体
import 'vfonts/Lato.css'
// 等宽字体
import 'vfonts/FiraCode.css'

app.mount('#app')
